{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "using LinearAlgebra\n",
    "using SparseArrays\n",
    "using CSV\n",
    "using DelimitedFiles"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "rank A:74 dimA: (76, 76)\n",
      "rank J:76 dimH: (76, 76)\n",
      " dimb: (76, 1)\n",
      "norm e0:77.94510544841152\n",
      "Norm H^-1 g: 1.63132649541292\n",
      "Norm A^-1 b: 1.1836468906224424\n"
     ]
    }
   ],
   "source": [
    "A = readdlm(\"/home/xuhao/output/A.txt\", ',', Float64);\n",
    "Asparse = sparse(A)\n",
    "H = readdlm(\"/home/xuhao/output/H.txt\", ',', Float64);\n",
    "Hsparse = sparse(H)\n",
    "g = readdlm(\"/home/xuhao/output/g.txt\", ',', Float64);\n",
    "J = readdlm(\"/home/xuhao/output/J.txt\", ',', Float64);\n",
    "Jsparse = sparse(J)\n",
    "b = readdlm(\"/home/xuhao/output/b.txt\", ',', Float64);\n",
    "e0 = readdlm(\"/home/xuhao/output/e0.txt\", ',', Float64);\n",
    "\n",
    "println(\"rank A: \", rank(A), \" dimA: \", size(A))\n",
    "println(\"rank J: \", rank(J), \" dimH: \", size(J))\n",
    "println(\" dimb: \", size(b))\n",
    "println(\"norm e0: \", norm(e0))\n",
    "println(\"Norm H^-1 g: \", norm(H\\g))\n",
    "println(\"Norm A^-1 b: \", norm(A\\b))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Julia 1.7.2",
   "language": "julia",
   "name": "julia-1.7"
  },
  "language_info": {
   "file_extension": ".jl",
   "mimetype": "application/julia",
   "name": "julia",
   "version": "1.7.2"
  },
  "orig_nbformat": 4
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
